<template>
  <view>
    <view class='footer acea-row row-between-wrapper' v-if="(item, index) in datalist" :key="item.index">
      <view class='bnt acea-row row-middle'>
        <!-- <view class="acea-row row-column-around">
          <uni-icons type="home" size="20" color="#646566"></uni-icons>
          <text >首页</text>
        </view> -->
        <view class="fts acea-row row-column-around">
          <uni-icons :type="item.icon" size="20" color="#646566"></uni-icons>
          <text >{{item.text}}</text>
        </view>
        <form @submit="goBuy"
              report-submit='true'
              v-if="canBuy">
          <button class='buy bnts'
                  form-type="submit">参与拼团</button>
        </form>
        <view  v-else>
          <button class='buy bnts'>不在拼团时间</button>
        </view>
        
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    name: Goodbar,
    data() {
      return {
        canBuy: 0
      }
    },
    props: {
      datalist: {
       	type: Array,
				default () {
					return [{
						icon: 'cart',
						text: '购物车',
					}, {
						icon: 'headphones',
						text: '客服'
					}]
				}
      }
    }
  }
</script>

<style >
.footer {
  position: fixed;
  bottom: 0;
  width: 750rpx;
  box-sizing: border-box;
  height: 100rpx;
  background-color: #fff;
  z-index: 277;
  border-top: 1rpx solid #f0f0f0;
}
.footer .bnt {
  width: 750rpx;
  height: 100rpx;
}

.footer .bnt .bnts {
  width: 240rpx;
  height: 70rpx;
  text-align: center;
  line-height: 70rpx;
  color: #fff;
  font-size: 28rpx;
  position: relative;
  border-radius: 70rpx;
  left: 60%;
}
.footer .bnt .buy {
  background-image: linear-gradient(to right, #fa6514 0%, #e93323 100%);
}
</style>